package com.ruoyi.news.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 新闻管理对象 news
 * 
 * @author 祁正
 * @date 2023-06-03
 */
public class News extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 新闻ID */
    private Long lid;

    /** 新闻标题 */
    @Excel(name = "新闻标题")
    private String title;

    /** 作者 */
    @Excel(name = "作者")
    private String author;

    /** 新闻封面 */
    private String coverpic;

    /** 新闻内容 */
    private String content;

    /** 阅读量 */
    @Excel(name = "阅读量")
    private Long readNumber;

    /** 点赞量 */
    @Excel(name = "点赞量")
    private Long likeNumber;

    /** 发布时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "发布时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date datetime;

    /** 新闻类型 */
    @Excel(name = "新闻类型")
    private Long tid;

    public void setLid(Long lid) 
    {
        this.lid = lid;
    }

    public Long getLid() 
    {
        return lid;
    }
    public void setTitle(String title) 
    {
        this.title = title;
    }

    public String getTitle() 
    {
        return title;
    }
    public void setAuthor(String author) 
    {
        this.author = author;
    }

    public String getAuthor() 
    {
        return author;
    }
    public void setCoverpic(String coverpic) 
    {
        this.coverpic = coverpic;
    }

    public String getCoverpic() 
    {
        return coverpic;
    }
    public void setContent(String content) 
    {
        this.content = content;
    }

    public String getContent() 
    {
        return content;
    }
    public void setReadNumber(Long readNumber) 
    {
        this.readNumber = readNumber;
    }

    public Long getReadNumber() 
    {
        return readNumber;
    }
    public void setLikeNumber(Long likeNumber) 
    {
        this.likeNumber = likeNumber;
    }

    public Long getLikeNumber() 
    {
        return likeNumber;
    }
    public void setDatetime(Date datetime)
    {
        this.datetime = datetime;
    }

    public Date getDatetime()
    {
        return datetime;
    }
    public void setTid(Long tid) 
    {
        this.tid = tid;
    }

    public Long getTid() 
    {
        return tid;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("lid", getLid())
            .append("title", getTitle())
            .append("author", getAuthor())
            .append("coverpic", getCoverpic())
            .append("content", getContent())
            .append("readNumber", getReadNumber())
            .append("likeNumber", getLikeNumber())
            .append("datetime", getDatetime())
            .append("tid", getTid())
            .toString();
    }
}
